﻿namespace Jim.K3Cloud;

/// <summary>
/// 分配
/// </summary>
[Sdk("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Allocate", "分配")]
public class K3CloudAllocateRequest : ISdkRequest<SdkResponse>, IK3CloudCustomRequest
{
    public string FormId { get; set; }
    /// <summary>
    /// 被分配的基础资料内码集合，字符串类型，格式："PkId1,PkId2,..."（必录）
    /// </summary>
    public string PkIds { get; set; }
    /// <summary>
    /// 目标组织内码集合，字符串类型，格式："TOrgId1,TOrgId2,..."（必录）
    /// </summary>
    public string TOrgIds { get; set; }

    public void Validate()
    {
    }

    public object QueryParams()
    {
        return new
        {
            FormId = FormId,
            Data = new
            {
                PkIds = PkIds,
                TOrgIds = TOrgIds,
            }
        };
    }
}

/// <summary>
/// 取消分配
/// </summary>
[Sdk("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.CancelAllocate", "取消分配")]
public class K3CloudCancelAllocateRequest : ISdkRequest<SdkResponse>,IK3CloudCustomRequest
{
    public string FormId { get; set; }
    /// <summary>
    /// 被分配的基础资料内码集合，字符串类型，格式："PkId1,PkId2,..."（必录）
    /// </summary>
    public string PkIds { get; set; }
    /// <summary>
    /// 目标组织内码集合，字符串类型，格式："TOrgId1,TOrgId2,..."（必录）
    /// </summary>
    public string TOrgIds { get; set; }

    public object QueryParams()
    {
        return new
        {
            FormId = FormId,
            Data = new
            {
                PkIds = PkIds,
                TOrgIds = TOrgIds,
            }
        };
    }

    public void Validate()
    {
    }
}

